<%@page import="bean.FmBoardVo"%>
<%@page import="bean.FmBoardDTO"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
<link rel = 'stylesheet' href='./FmBoard/Board.css'/>
<script src='./FmBoard/Board.js'></script>
</head>
<body>

<jsp:useBean id="board" class="bean.FmBoardVo" scope="page"></jsp:useBean>
<jsp:setProperty property="*" name="board"/>


<%
FmBoardDTO dto = new FmBoardDTO();
dto.setVo(board);
FmBoardVo v = dto.selectOne();

int de = v.getDeep().split("-").length;


%>




<h1><%=v.getSubject() %></h1>
<%if(de==1){ %>
<form name='hiddenFrm' method='post' enctype="multipart/form-data">

<div id='chFinish'><input type='checkbox' name='finish' value='분양완료'/></div>
<p/>
<div class='items'>품종</div> 
<div id='chKind'><select name='kind' size='1'>
		<option <% if(v.getKind().equals("강아지")){ %> selected="selected" <%} %> value='강아지'>강아지</option>
		<option  <% if(v.getKind().equals("고양이")){ %> selected="selected" <%} %> value='고양이'>고양이</option>
		<option <% if(v.getKind().equals("페릿")){ %> selected="selected" <%} %>  value='페릿'>페릿</option>
		<option  <% if(v.getKind().equals("호랑이")){ %> selected="selected" <%} %> value='호랑이'>호랑이</option>
		<option  <% if(v.getKind().equals("팬더")){ %> selected="selected" <%} %> value='팬더'>팬더</option></select></div>
<p/>
<div class='items'>보호지역</div>
<div id='chLocate'><select name='locate' size='1'>
		<option <% if(v.getLocate().equals("서울시")){ %> selected="selected" <%} %> value='서울시'>서울시</option>
		<option  <% if(v.getLocate().equals("경상도")){ %> selected="selected" <%} %> value='경상도'>경상도</option>
		<option <% if(v.getLocate().equals("전라도")){ %> selected="selected" <%} %>  value='전라도'>전라도</option>
		<option <% if(v.getLocate().equals("강원도")){ %> selected="selected" <%} %>  value='강원도'>강원도</option>
		<option <% if(v.getLocate().equals("함경도")){ %> selected="selected" <%} %> value='함경도'>함경도</option></select></div>		
<div class='items'>성별</div>
<div id='chGender'></div>		 
	<select name='gender' size='1'>
		<option <% if(v.getGender().equals("남아")){ %> selected="selected" <%} %> value='남아'>남아</option>
		<option <% if(v.getGender().equals("여아")){ %> selected="selected" <%} %> value='여아'>여아</option></select>	
<p/>
<div class='items'>제목</div>
<div id='chSubject'><input type='text' name='subject' id='subject' value="<%=v.getSubject() %>"/></div>
<p/>
<div class='items'>나이</div>
<div id='chAge'><input type='number' min='0' value='0' name='age' size='10' value=<%=v.getAge() %> />살</div>
<p/>
<div class='items'>책임비</div>
<div id='chMoney'><input type='number' min='0' value='30000' name='money' step='10000' value=<%=v.getMoney() %> />원</div>
<p/>
<div id='chFile'><input type='file' name='pic' value='파일 첨부'/></div>
<p/>
<div id='chContent'><textarea  name='content' id='content' ><%=v.getContent() %></textarea></div>
		
		
<input type='button' value='확인' id='btnSave'/>
<input type='button' value='취소' id='btnView'/>

<%-- 	
<table align = 'center' border = '1px'>

<tr>
	<td rowspan=2><%if(v.getPic()!=null){ %><img src='./BoardPhoto/sm_<%=v.getPic() %>' align="middle" alt ='사진' width='100px' height='100px'>
	<%}else{ %><img src='./FmBoard/noImg.png' align="middle" alt ='사진' width='100px' height='100px'><%} %></td>
	<td width="50" bgcolor='#99ccff'>품종</td>
	<td><select name='kind' size='1'>
		<option <% if(v.getKind().equals("강아지")){ %> selected="selected" <%} %> value='강아지'>강아지</option>
		<option <% if(v.getKind().equals("고양이")){ %> selected="selected" <%} %> value='고양이'>고양이</option>
		<option <% if(v.getKind().equals("페릿")){ %> selected="selected" <%} %> value='페릿'>페릿</option>
		<option <% if(v.getKind().equals("호랑이")){ %> selected="selected" <%} %> value='호랑이'>호랑이</option>
		<option <% if(v.getKind().equals("팬더")){ %> selected="selected" <%} %> value='팬더'>팬더</option></select></td>
	<td bgcolor='#99ccff'>보호지역</td>
	<td><select name='locate' size='1' >
		<option <% if(v.getLocate().equals("서울시")){ %> selected="selected" <%} %> value='서울시'>서울시</option>
		<option <% if(v.getLocate().equals("경상도")){ %> selected="selected" <%} %> value='경상도'>경상도</option>
		<option <% if(v.getLocate().equals("전라도")){ %> selected="selected" <%} %> value='전라도'>전라도</option>
		<option <% if(v.getLocate().equals("강원도")){ %> selected="selected" <%} %> value='강원도'>강원도</option>
		<option <% if(v.getLocate().equals("함경도")){ %> selected="selected" <%} %> value='함경도'>함경도</option></select></td>
	<td bgcolor='#99ccff'>성별</td>
	<td><select name='gender' size='1' >
		<option <% if(v.getGender().equals("남아")){ %> selected="selected" <%} %>value='남아'>남아</option>
		<option <% if(v.getGender().equals("여아")){ %> selected="selected" <%} %>value='여아'>여아</option></select></td></tr>

<tr>
	<td width="50" bgcolor='#99ccff'>제목</td>
	<td colspan=5><input type='text' name='subject' size='75' value="<%=v.getSubject() %>"/></td></tr>

<tr>
	<td><input type='file' name='pic' value='파일 첨부' /></td>
	<td width="50" bgcolor='#99ccff'>나이</td>
	<td><input type='number' min='0' value=<%=v.getAge() %> name='age' size='10'/>살</td>
	<td bgcolor='#99ccff'>책임비</td>
	<td><input type='number' min='0' value=<%=v.getMoney() %> name='money' step='1000'/>원</td>
	<td><input type='checkbox' name='finish' value='분양완료'/></td>
	<td>분양완료</td></tr>

<tr>
	<td colspan=7><textarea cols="120" rows='10' name='content' ><%=v.getContent() %></textarea></td></tr>
<tr>
	<td></td>
	<td></td>
	<td></td>
	<td></td>
	<td></td>
	<td><input type='button' value='확인' id='btnSave'/></td>
	<td><input type='button' value='취소' id='btnView'/></td></tr>
	

</table> --%>
<input type='hidden' name='nowPage' value='<%=board.getNowPage() %>'/>	
	<input type='hidden' name='kindFind' value='<%=board.getKindFind()%>'/>
	<input type='hidden' name='locateFind' value='<%=board.getLocateFind()%>'/>
	<input type='hidden' name='genderFind' value='<%=board.getGenderFind()%>'/>
	<input type='hidden' name='find' value='<%=board.getFind()%>'/>
<input type='hidden' name='rno' value='<%=board.getRno()%>'/>
<input type='hidden' name='mid' value='<%=v.getMid()%>'/>
<input type='hidden' name='prepic' value='<%=v.getPic()%>'/>
	
</form>
<%}else{ %>
<form name='hiddenFrm' method='post'>
	
	
<div class='items'>제목</div>
<div id='chSubject'><input type='text' name='subject' id='subject' value="<%=v.getSubject() %>"/></div>
<p/>	
	
<div id='chContent'><textarea  name='content' id='content' ><%=v.getContent() %></textarea></div>
<p/>	
	
<input type='button' value='확인' id='btnSave'/>
<input type='button' value='취소' id='btnView'/>	
	
<%-- <table align = 'center' border = '1px'>
<tr>
	<td width="50" bgcolor='#99ccff'>제목</td>
	<td><input type='text' name='subject' size='75' value="<%=v.getSubject() %>"/></td></tr>
<tr>
	<td colspan=2><textarea cols="120" rows='10' name='content' ><%=v.getContent() %></textarea></td></tr>
<tr>
	<td><input type='button' value='확인' id='btnSave'/></td>
	<td><input type='button' value='취소' id='btnView'/></td></tr>
</table> --%>

<input type='hidden' name='nowPage' value='<%=board.getNowPage() %>'/>
	<input type='hidden' name='find' value='<%=board.getFind()%>'/>
	<input type='hidden' name='kindFind' value='<%=board.getKindFind()%>'/>
	<input type='hidden' name='locateFind' value='<%=board.getLocateFind()%>'/>
	<input type='hidden' name='genderFind' value='<%=board.getGenderFind()%>'/>
<input type='hidden' name='rno' value='<%=board.getRno()%>'/>
<input type='hidden' name='mid' value='<%=v.getMid()%>'/>
<input type='hidden' name='prepic' value='<%=v.getPic()%>'/>
	
</form>

<%} %>








<script>bModifyInit();</script>
</body>
</html>